Fix(BREV-2357): CloudCredId in nebius cloud#73
Conversation
|
I've approved, but before I merge can you walk me through an example of what used to happen and what will happen now with the fix instead which would prevent this from being deleted by the DeleteOrphanWorkflow? I'm having trouble understanding the moving pieces. |
We identified two root causes for the bug where Nebius instances were being deleted from dev environments:
When we looked into how Nebius handles tags, we found that during instance creation, the CloudCredRefID label isn’t stored as a tag (reference). Additionally, when listing instances, Nebius always sets CloudCredRefID to the current client’s refID, not the creator’s (reference): In contrast, other providers like Shadeform store the cloudCredRefID as a tag when creating an instance and then read it from the tags when listing instances (for-ref, for-ref): Nebius had CloudCredRefID set to current CloudCredRefID, which allows these instances to bypass the CloudCredRefID check. We have resolved this bug in the current PR by ensuring that the correct CloudCredRefID is now properly stored and utilized. |
CloudCredRefIDfield was always set to the current client's credential ID (c.refID), not the ID of the credential that was originally used to create the instance.cloud-cred-ref-idfrom the instance labels instead of using the current client's IDcloud-cred-ref-idlabel), the code falls back to the current client's ID with a warning log